import React from 'react'
import { Badge, TabBar } from 'antd-mobile'
import { homeRouter } from '../../router/Index'
import { Outlet,useNavigate } from 'react-router-dom'
function Index() {
    let navigate=useNavigate()
  return (
    <div style={{width:'100%',}}>
        <main style={{height:'88vh'}}><Outlet></Outlet></main>
        <footer >
          <TabBar onChange={(key)=>navigate(key)}>
          {homeRouter.map(item => (
            <TabBar.Item key={item.path} icon={item.icon} title={item.title} />
          ))}
        </TabBar>  
        </footer>
     
    </div>
  )
}

export default Index
